package com.yangrd.airship.generator.support.impl;

import com.yangrd.airship.generator.support.PageGeneratorDefineMetaHook;
import com.yangrd.airship.generator.page.PageGeneratorDefine;
import lombok.RequiredArgsConstructor;

import java.util.List;

/**
 * @author yangrd
 * @date 2021/11/9
 */
@RequiredArgsConstructor
public class CompositePgdMetaHook implements PageGeneratorDefineMetaHook {

    private final List<PageGeneratorDefineMetaHook> delegates;

    @Override
    public void handler(PageGeneratorDefine tableGeneratorDefine, Object target) {
        delegates.forEach(delegate->delegate.handler(tableGeneratorDefine, target));
    }
}
